package com.lin.cms.domain;

import java.io.Serializable;

public class ChannelUser implements Serializable {

	private static final long serialVersionUID = 1L;

	private int channelId;

	private int userId;

	public ChannelUser() {
	}

	public int getChannelId() {
		return channelId;
	}

	public void setChannelId(int channelId) {
		this.channelId = channelId;
	}

	public int getUserId() {
		return userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + channelId;
		result = prime * result + userId;

		return result;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final ChannelUser other = (ChannelUser) obj;
		if (channelId != other.channelId)
			return false;
		if (userId != other.userId)
			return false;

		return true;
	}
	
	@Override
	public String toString() {
		return getClass().getName() + "@" + Integer.toHexString(hashCode()) + 
			"(" + 
			"channelId=" + "'" + channelId + "'" + ", " + 
			"userId=" + "'" + userId + "'" + 
			")";
	}
	
}
